package org.outlook.apps.lunar;

public class LunarElement {

	private boolean isToday;
	private int year;
	private int month;
	private int day;
	private String week;
	private int lYear;
	private int lMonth;
	private int lDay;
	private boolean leap;
	private String cYear;
	private String cMonth;
	private String cDay;
	private String lunarFestival;
	private String solarFestival;
	private String solarTerms;
	private String color;

	public LunarElement(int sYear,int sMonth,int sDay,String week,int lYear,int lMonth,int lDay,boolean isLeap,String cYear,String cMonth,String cDay) {

        this.isToday    = false;
        //国历
        this.year      = sYear;
        this.month     = sMonth;
        this.day       = sDay;
        this.week       = week;
        //农历
        this.lYear      = lYear;
        this.lMonth     = lMonth;
        this.lDay       = lDay;
        this.leap     = isLeap;
        //干支
        this.cYear      = cYear;
        this.cMonth     = cMonth;
        this.cDay       = cDay;

//        this.color      = '';

        this.lunarFestival = null; //农历节日
        this.solarFestival = null; //国历节日
        this.solarTerms    = null; //节气

	}

	public boolean isToday() {
		return isToday;
	}

	public void setToday(boolean isToday) {
		this.isToday = isToday;
	}

	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getMonth() {
		return month;
	}

	public void setMonth(int month) {
		this.month = month;
	}

	public int getDay() {
		return day;
	}

	public void setDay(int day) {
		this.day = day;
	}

	public String getWeek() {
		return week;
	}

	public void setWeek(String week) {
		this.week = week;
	}

	public int getlYear() {
		return lYear;
	}

	public void setlYear(int lYear) {
		this.lYear = lYear;
	}

	public int getlMonth() {
		return lMonth;
	}

	public void setlMonth(int lMonth) {
		this.lMonth = lMonth;
	}

	public int getlDay() {
		return lDay;
	}

	public void setlDay(int lDay) {
		this.lDay = lDay;
	}

	public boolean isLeap() {
		return leap;
	}

	public void setLeap(boolean leap) {
		this.leap = leap;
	}

	public String getcYear() {
		return cYear;
	}

	public void setcYear(String cYear) {
		this.cYear = cYear;
	}

	public String getcMonth() {
		return cMonth;
	}

	public void setcMonth(String cMonth) {
		this.cMonth = cMonth;
	}

	public String getcDay() {
		return cDay;
	}

	public void setcDay(String cDay) {
		this.cDay = cDay;
	}

	public String getLunarFestival() {
		return lunarFestival;
	}

	public void setLunarFestival(String lunarFestival) {
		this.lunarFestival = lunarFestival;
	}

	public String getSolarFestival() {
		return solarFestival;
	}

	public void setSolarFestival(String solarFestival) {
		this.solarFestival = solarFestival;
	}

	public String getSolarTerms() {
		return solarTerms;
	}

	public void setSolarTerms(String solarTerms) {
		this.solarTerms = solarTerms;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}
	
	public boolean isSpecialDay() {
		return lunarFestival!=null || solarFestival!=null || solarTerms!=null;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append(year).append('-').append(month).append('-').append(day).append(' ');
		sb.append('\t').append(cYear).append('年').append(' ').append(cMonth).append('月').append(' ').append(cDay).append('日');
		sb.append('\t').append("农历").append(lYear).append('年').append(lMonth).append('月').append(lDay);
		sb.append('\t').append(lunarFestival==null?"":lunarFestival+'\t').append(solarFestival==null?"":solarFestival+'\t').append(solarTerms==null?"":solarTerms+'\t');
		sb.append('\t').append(isToday?"##Today## ":"").append(color==null?"":"Color:"+color);
		return sb.toString();
	}

}
